#ifndef UPDATEPIECENETWORKEVENT_H_
#define UPDATEPIECENETWORKEVENT_H_

#include "NetworkEvent.h"
#include "Position.h"

class UpdatePieceNetworkEvent : public NetworkEvent
{
public:
    struct Data
    {
        long id;
        int x;
        int y;
    };

    struct Message
    {
        Header header;
        Data data;
    };

    UpdatePieceNetworkEvent(long id, const Position& position);
    UpdatePieceNetworkEvent(const Header& header, const Data& data);
    virtual ~UpdatePieceNetworkEvent();

    virtual void visitPiece(Piece* piece) const;

    virtual void* getMessageBlob();
    virtual size_t getMessageBlobSize();

private:
    Message message;

};

#endif
